﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed

#pragma once


namespace gcmp
{
    class IFace;
    class IPolygon;
    class IBody;

    /// \brief 几何属性计算类，用于计算几何对象的属性，如边的长度、面的面积、体的体积
    class IProperty
    {
    public:
        virtual ~IProperty() {}

    public:
        /// \brief  计算面的面积
        /// \param  pFace     面
        /// \return    面积
        virtual double GetArea(const IFace* pFace)const = 0;

        /// \brief  计算多边形的面积
        /// \param  pPolygon   多边形
        /// \return   面积
        virtual double GetArea(const IPolygon* pPolygon)const = 0;

        /// \brief   计算体的体积
        /// \param  pBody
        /// \return   体积
        virtual double GetVolume(const IBody* pBody)const = 0;
    };
}